import { post } from "../utils/axios";
import Taro from '@tarojs/taro'

class exchange {
  obj = {
    app_id : Taro.getStorageSync('app_id'),
    token:  Taro.getStorageSync('token'),
    room_id:  Taro.getStorageSync('store_id'),
  };
  
   // 交班
   async changeDutySubmit(data) {
    let newdata = Object.assign(data, this.obj);
    const res = await post("offlinestore/agent.Changeduty/task_detail", newdata);
    return res
  }
  // 班次列表
  async classSetList() {
    const res = await post("offlinestore/agent.Offline_class/index", this.obj);
    return res
  }
  // 交班记录
  async changeDutyList(data) {
    let newdata = Object.assign(data, this.obj);
    const res = await post("offlinestore/agent.Offlineadminduty/index", newdata);
    return res
  }
  // 班次列表
  async employeeList() {
    const res = await post("offlinestore/agent.employee/index", this.obj);
    return res
  }
}

export default new exchange;
